package com.maimao.core.constant;

/**
 * @author MaoLin Wang
 * @date 2021/4/13 9:20 下午
 */
public class KillConstant {

    /**
     * 秒杀商品详情key + killId
     */
    public static final String KILL_GOODS_DETAIL = "kill_goods_";

    /**
     * 秒杀生成的验证码key
     */
    public static final String KILL_CODE_KEY = "kill_code_";

    /**
     * 秒杀接口对于每个用户每个商品生成盐值的key，hash结构 key:kill_md5_inter+killId+userId, value:md5
     */
    public static final String KILL_MD5_INTERFACE_KEY = "kill_md5_inter";


    /**
     * 已秒杀商品的用户集合 key:kill_goods_user+killId, values:所有秒杀过killId的用户id
     */
    public static final String KILL_GOODS_USER = "kill_goods_user";

    /**
     * 秒杀库存
     */
    public static final String KILL_STOCK_KEY = "kill_stock";

    /**
     * 秒杀成功预生成的订单信息key 【+orderId】
     */
    public static final String KILL_SUCCESS_ORDER = "kso_";

    /**
     * 默认商品秒杀时间周期（2小时）
     */
    public static final int DEFAULT_KILL_CIRCLE = 2;

    /**
     * 默认每期坑位数
     */
    public static final int DEFAULT_SCHEDULE_COUNT = 100;

    /**
     * 秒杀接口md5默认有效期 60s
     */
    public static final int DEFAULT_KILL_MD5 = 60;


}
